JavaScript Trim start

trimStart() removes whitespace from the beginning of a string only, leaving the end intact. It returns a new string.

Syntax

str.trimStart()

Examples

Input Arguments Output
" hi " "hi "

Try it live

Type your input and see Trim start transform it instantly.

Description: Removes whitespace from the start of the string.

Example: ' latte'.trimStart() => 'latte'

Want to go further? Chain Trim start with other functions in the visual Playground — pipe one output into the next and watch your data transform.

Related functions

© 2026 Heifara Buval